home *** CD-ROM | disk | FTP | other *** search
/ Aminet 25 / Aminet 25 (1998)(GTI - Schatztruhe)[!][Jun 1998].iso / Aminet / dev / c / MemPools.lha / Makefile < prev    next >
Makefile  |  1998-03-12  |  3KB  |  121 lines

  1. ###
  2. ###  MemPools:  malloc() replacement using standard Amiga pool functions.
  3. ###  Copyright  (C)  1994    Jochen Wiedmann
  4. ###
  5. ###  This program is free software; you can redistribute it and/or modify
  6. ###  it under the terms of the GNU General Public License as published by
  7. ###  the Free Software Foundation; either version 2 of the License, or
  8. ###  (at your option) any later version.
  9. ###
  10. ###  This program is distributed in the hope that it will be useful,
  11. ###  but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. ###  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13. ###  GNU General Public License for more details.
  14. ###
  15. ###  You should have received a copy of the GNU General Public License
  16. ###  along with this program; if not, write to the Free Software
  17. ###  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  18. ###
  19. ###
  20. ###  This is the Makefile for gmake.
  21. ###
  22. ###
  23. ###  Computer:  Amiga 1200
  24. ###
  25. ###  Compilers: Dice 3.01
  26. ###             SAS/C 6.50
  27. ###             gcc 2.6.1
  28. ###
  29. ###
  30. ###  Author:    Jochen Wiedmann
  31. ###             Am Eisteich 9
  32. ###       72555 Metzingen
  33. ###             Germany
  34. ###
  35. ###             Phone: (0049) 7123 14881
  36. ###             Internet: jochen.wiedmann@uni-tuebingen.de
  37. ###
  38.  
  39.  
  40. SRCS=calloc.c free.c init.c malloc.c realloc.c strdup.c \
  41.      MemPoolPuddleSize.c MemPoolThreshSize.c MemPoolFlags.c
  42.  
  43. OBJS=calloc.o free.o init.o malloc.o realloc.o strdup.o \
  44.      MemPoolPuddleSize.o MemPoolThreshSize.o MemPoolFlags.o
  45.  
  46. LIBS=mempoolss.lib mempoolssr.lib mempools.lib libmempools.a
  47.  
  48. CFLAGS=-pipe -pedantic -Wall -ansi -O3
  49. CC=gcc
  50.  
  51. ############################################################################
  52. ###
  53. ###  Targets: all clean dist check time
  54. ###
  55. ############################################################################
  56.  
  57. all: libmempools.a
  58.  
  59. dist:
  60.     smake dist
  61.  
  62. mempools.lib:
  63.     rm -rf #?.o
  64.     smake mempools.lib
  65.  
  66. libmempools.a:
  67.     rm -f libmempools.a
  68.     for file in $(OBJS); do \
  69.         echo gcc -c $(CFLAGS) `basename $$file .o`.c -o $$file; \
  70.         gcc -c $(CFLAGS) `basename $$file .o`.c -o $$file; \
  71.     done;
  72.     ar q libmempools.a $(OBJS)
  73.     ranlib libmempools.a
  74.     rm $(OBJS)
  75.  
  76. libmempoolsd.a:
  77.     rm -f libmempoolsd.a
  78.     for file in $(OBJS); do \
  79.         echo gcc -c -DDEBUG -g -gstabs $(CFLAGS) `basename $$file .o`.c -o $$file; \
  80.         gcc -c -DDEBUG -g -gstabs $(CFLAGS) `basename $$file .o`.c -o $$file; \
  81.     done;
  82.     ar q libmempoolsd.a $(OBJS)
  83.     ranlib libmempoolsd.a
  84.     rm $(OBJS)
  85.  
  86. clean:
  87.     rm -rf #?.o #?.lib lib#?.a
  88.  
  89. check: TimeMem
  90.     @avail flush
  91.     @TimeMem VERBOSE
  92.     @avail flush
  93.     @rm -f TimeMem TimeMem.o
  94.  
  95. time: TimeMem TimeMem.sas TimeMem.ixemul TimeMem.libnix TimeProg
  96.     @echo You'd better get a cup of coffee now ...
  97.     @echo
  98.     @echo Timing SAS/C functions
  99.     @TimeProg "TimeMem.sas"
  100.     @echo Timing ixemul functions
  101.     @TimeProg "TimeMem.ixemul"
  102.     @echo Timing libnix functions
  103.     @TimeProg "TimeMem.libnix"
  104.     @echo Timing MemPool functions
  105.     @TimeProg "TimeMem"
  106.  
  107. TimeMem: TimeMem.c
  108.     gcc -ansi -noixemul $(CFLAGS) -o TimeMem TimeMem.c -L. -lmempools
  109.  
  110. TimeMem.sas: TimeMem.c
  111.     smake TimeMem.sas
  112.  
  113. TimeMem.ixemul: TimeMem.c
  114.     gcc -ansi $(CFLAGS) -o TimeMem.ixemul TimeMem.c
  115.  
  116. TimeMem.libnix: TimeMem.c
  117.     gcc -ansi -noixemul $(CFLAGS) -o TimeMem.libnix TimeMem.c
  118.  
  119. TimeProg: TimeProg.c
  120.     gcc -ansi -noixemul $(CFLAGS)
  121.